/**
 * Created by ls-PC on 2016/7/26.
 */
var moment = require('moment');
module.exports = function (orm, db) {

    var Hospitalsect= db.define('hospitalsect',{
        sectname:String,
        sectdesc:String,
        sectqq:String,
        isvalid:Boolean

    },{
        methods:{
            serialize: function () {
                return {
                    id:this.id,
                   sectname:this.sectname,
                   sectdesc:this.sectdesc,
                    sectqq:this.sectqq,
                    isvalid:this.isvalid
                }
            }
        }
    });
    Hospitalsect.hasOne('hospital',db.models.Hospital,{required: true, reverse: 'hospitalsects', autoFetch: true})
};